Balloon driver should hijack the ->lru list field rather than
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 2 May 2006 16:23:21 +0000 (17:23 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 2 May 2006 16:23:21 +0000 (17:23 +0100)
adding another list field to every page structure.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
linux-2.6-xen-sparse/include/linux/mm.h

index 1a7216c8bda0efe91f1b9d68739170d2f3ab0aa7..58638a5d989598545379b0821347189c2241aa34 100644 (file)
@@ -94,8 +94,8 @@ static void balloon_process(void *unused);
 static DECLARE_WORK(balloon_worker, balloon_process, NULL);
 static struct timer_list balloon_timer;
 
-#define PAGE_TO_LIST(p) (&(p)->ballooned)
-#define LIST_TO_PAGE(l) list_entry((l), struct page, ballooned)
+#define PAGE_TO_LIST(p) (&(p)->lru)
+#define LIST_TO_PAGE(l) list_entry((l), struct page, lru)
 #define UNLIST_PAGE(p)                         \
        do {                                    \
                list_del(PAGE_TO_LIST(p));      \
index 946f3e52a5fcedf67add0d6d60d5b736a0ada46b..338f4823589ae4bab4d0eea3eeeea46155921551 100644 (file)
@@ -247,9 +247,6 @@ struct page {
            };
 #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
            spinlock_t ptl;
-#endif
-#ifdef CONFIG_XEN
-           struct list_head ballooned;
 #endif
        };
        pgoff_t index;                  /* Our offset within mapping. */